ISLOGIN = false;
SECTION_CHARGE={CHARGE:{key:"C", value:"收费"},FREE:{key:"F", value:"免费"}};
YES_NO=[
    {label:"All", value:"All"},
    {label:"Yes", value:"Yes"},
    {label:"No", value:"No"}
];
COURSE_LEVEL={ONE:{key:"1", value:"初级"},TWO:{key:"2", value:"中级"},THREE:{key:"3", value:"高级"}};
COURSE_CHARGE={CHARGE:{key:"C", value:"收费"},FREE:{key:"F", value:"免费"}};
COURSE_STATUS={PUBLISH:{key:"P", value:"发布"},DRAFT:{key:"D", value:"草稿"}};
SMS_USE={REGISTER:{key:"R", value:"注册"},FORGET:{key:"F", value:"忘记密码"}};
SMS_STATUS={USED:{key:"U", value:"已使用"},NOT_USED:{key:"N", value:"未使用"}};

SECTION_CHARGE_ARRAY=[{key:"C", value:"收费"},{key:"F", value:"免费"}];
YES_NO_ARRAY=[{key:"1", value:"是"},{key:"0", value:"否"}];
COURSE_LEVEL_ARRAY=[{key:"1", value:"初级"},{key:"2", value:"中级"},{key:"3", value:"高级"}];
COURSE_CHARGE_ARRAY=[{key:"C", value:"收费"},{key:"F", value:"免费"}];
COURSE_STATUS_ARRAY=[{key:"P", value:"发布"},{key:"D", value:"草稿"}];
FILE_USE_ARRAY=[{key:"C", value:"课程"},{key:"T", value:"讲师"}];
SMS_USE_ARRAY=[{key:"R", value:"注册"},{key:"F", value:"忘记密码"}];
SMS_STATUS_ARRAY=[{key:"U", value:"已使用"},{key:"N", value:"未使用"}];

FILE_USE={
    VIEW:{key:"V", value:"查看"},
    JUDGE:{key:"G", value:"评测"},
    READ_FILE:{key:"RF", value:"读取文件中的内容后评测"},
    EVALUATE_FUNCTION_FIGURE:{key:"EFF", value:"评测函数图形"},
    EVALUATE_GEOMETRIC_FIGURE:{key:"EGF", value:"评测几何图形"},
    EVALUATE_STATISTICAL_CHART:{key:"ESC", value:"评测统计图形"}
};
FILE_DOMAIN = "http://172.22.114.196:8080/f/"
SERVER_DOMAIN = "http://172.22.114.196"

TRAINING_LANGUAGES = {
    "C": {
        key: 'C',
        value: 1
    },
    "CPlus": {
        key : 'C_PLUS_PLUS',
        // key : 'C++',
        value: 2
    },
    "Java": {
        key : 'JAVA',
        value: 3
    },
    "PASCAL": {
        key : 'PASCAL',
        value : 4
    },
    "Python": {
        key : 'PYTHON3',
        value : 5
    },
    "RUBY": {
        key : 'RUBY',
        value : 6
    }
}

SUBMISSION_RESULT = {
    AC: {
        key: 'AC',
        value: '通过'
    },
    PD: {
        key: 'PD',
        value: '系统仍在处理'
    },
    WA: {
        key: 'WA',
        value: '答案错误'
    },
    TLE: {
        key: 'TLE',
        value: '超出时间限制'
    },
    OLE: {
        key: 'OLE',
        value: '输出超出限制'
    },
    MLE: {
        key: 'MLE',
        value: '内存超出限制'
    },
    RE: {
        key: 'RE',
        value: '运行时错误'
    },
    PE: {
        key: 'PE',
        value: '展示错误'
    },
    CE: {
        key: 'CE',
        value: '编译错误'
    },
    SE: {
        key: 'SE',
        value: '系统错误'
    },
}

USER_GROUP = {
    Forbidden: {
        key: 1,
        value: 'Forbidden',
    },
    Users: {
        key: 2,
        value: 'User'
    },
    Judgers: {
        key: 4,
        value: 'Judge'
    },
    Administrators: {
        key: 8,
        value: 'Administrators'
    },
}

PROBLEM_TAG_SLUGS = [
    {
        label : 'All',
        value : 0,

    },
    {
        label : 'Ultra',
        value : 3,
        id: 3
    },
    {
        label : 'Difficult',
        value : 4,
        id: 4
    },
    {
        label : 'Medium',
        value : 5,
        id: 5
    },
    {
        label : 'Easy',
        value : 6,
        id: 6
    },
]

C_CODE_TEMPLATE = "#include<stdio.h>\n" +
    "int main(){\n" +
    "    return 0;\n" +
    "}"

CPLUS_CODE_TEMPLATE = "#include<iostream>\n" +
    "using namespace std;\n" +
    "int main()\n" +
    "{\n" +
    "        return 0;\n" +
    "}"

JAVA_CODE_TEMPLATE = "import java.util.*;\n" +
    "public class Main {\n" +
    "    public static void main(String[] args) {\n" +
    "        System.out.println(\"Hello World\");\n" +
    "    }\n" +
    "}"

PYTHON_CODE_TEMPLATE = "def fun(a, b):\n" +
    "#********* Begin *********# \n" +
    "\n" +
    "\n" +
    "#********* End *********# \n" +
    "\n" +
    "a,b=map(int,input().split())\n" +
    "c = fun(a, b)\n" +
    "print(c)"


LANGUAGE_CODE_TEMPLATE = [
    C_CODE_TEMPLATE,
    CPLUS_CODE_TEMPLATE,
    JAVA_CODE_TEMPLATE,
    PYTHON_CODE_TEMPLATE
]

ABOUT_US = "如果使用时发现问题，可联系 1204650012@qq.com"

INSTRUCTIONS =

    "请务必使用PC机上的谷歌或者火狐浏览器登录，其他浏览器或者手机均不能保证兼容性。使用前需要先注册然后登录才能正常使用。\n" +
    "\n" +
    " \n" +
    "\n" +
    "### 编程环境：\n" +
    "\n" +
    "（1）系统支持C/C++/Java/Python语言，其它语言均不能通过编译。\n" +
    "\n" +
    "（2）后台是linux服务器，采用gcc编译器，编译时不带任何额外参数。\n" +
    "\n" +
    "（3）前端可以采用任何兼容gcc编译器的开发工具，但请自行保证兼容性。如果是Windows平台，推荐使用Dev-Cpp、Code::Blocks或者VS Code。\n" +
    "\n" +
    "（4）请用PC机上的谷歌或者火狐浏览器登录系统，其他浏览器均不保证兼容性。\n" +
    "\n" +
    " \n" +
    "\n" +
    "### 编程中需要注意的问题：\n" +
    "\n" +
    "（1）输出数据请严格按照题目给定的格式，一定不要输出多余的提示信息或者空行，判题程序没有人那么聪明，无法略过这些多余信息。\n" +
    "\n" +
    "（2）main函数最后务必用“return 0;”返回，否则可能会判为程序异常。\n" +
    "\n" +
    "（3）读入一行字符串时请尽量使用gets或者fgets函数，如使用getchar()函数请自行保证跨平台的兼容性。\n" +
    "\n" +
    "（4）对任何浮点数的处理，请使用double类型，不要使用float类型，因为后者的精度太低。\n" +
    "\n" +
    "（5）如果使用C++语言，请尽量避免使用万能头文件，这会显著降低编译器的编译速度。\n" +
    "\n" +
    "（6）请不要包含特定平台上的头文件，这将无法通过编译。\n" +
    "\n" +
    " \n" +
    "\n" +
    "### 评分规则：\n" +
    "\n" +
    "评分规则采用CCF CSP的评分规则，每道题目有10个测试集，每个测试集为10分，满分100分，不计算奖惩分。答案可以多次提交，以最后一次提交为准。系统会实时返回成绩，用户可以根据评分情况改正程序中的错误。\n" +
    "\n" +
    "\n" +
    "\n" +
    "### 初学者容易犯的错误举例\n" +
    "#### 题目：输入两个正整数a和b，输出它们的和，占一行。\n" +
    "\n" +
    " \n" +
    "\n" +
    "【错误示例1】\n" +
    "\n" +
    "\n" +
    "```\n" +
    "#include<stdio.h>\n" +
    "\n" +
    "int main()\n" +
    "\n" +
    "{\n" +
    "\n //TestFor" +
    "    int a,b;\n" +
    "\n" +
    "    scanf(\"%d%d\",&a,&b);\n" +
    "\n" +
    "    printf(\"%d\",a+b);\n" +
    "\n" +
    "}\n" +

    "```\n" +
    "\n" +
    "错误原因：最后没有写\"return 0;\"\n" +
    "\n" +
    " \n" +
    "\n" +
    "【错误示例2】\n" +
    "\n" +
    "\n" +
    "```\n" +
    "#include<stdio.h>\n" +
    "void main()\n" +
    "\n" +
    "{\n" +
    "\n" +
    "    int a,b;\n" +
    "\n" +
    "    scanf(\"%d%d\",&a,&b);\n" +
    "\n" +
    "    printf(\"%d\",a+b);\n" +
    "\n" +
    "    return 0;\n" +
    "\n" +
    "}\n" +
    "```\n" +
    "\n" +
    "错误原因：不应该是\"void main()\"，而应该是\"int main()\"\n" +
    "\n" +
    " \n" +
    "\n" +
    "【错误示例3】\n" +
    "\n" +
    "\n" +
    "```\n" +
    "#include<stdio.h>\n" +
    "\n" +
    "int main()\n" +
    "\n" +
    "{\n" +
    "\n" +
    "    int a,b;\n" +
    "\n" +
    "    printf(\"please input two numbers:\");\n" +
    "\n" +
    "    scanf(\"%d%d\",&a,&b);\n" +
    "\n" +
    "    printf(\"%d\",a+b);\n" +
    "\n" +
    "    return 0;\n" +
    "\n" +
    "}\n" +
    "```\n" +
    "\n" +
    "错误原因：第一行的输出语句完全是多余的，会导致评分出错\n" +
    "\n" +
    " \n" +
    "\n" +
    "【错误示例4】\n" +
    "\n" +
    "\n" +
    "```\n" +
    "#include<stdio.h>\n" +
    "\n" +
    "int main()\n" +
    "\n" +
    "{\n" +
    "\n" +
    "    int a,b;\n" +
    "\n" +
    "    scanf(\"%d%d\",&a,&b);\n" +
    "\n" +
    "    printf(\"\\n%d\",a+b);\n" +
    "\n" +
    "    return 0;\n" +
    "\n" +
    "}\n" +
    "```\n" +
    "\n" +
    "错误原因：printf函数中的\"\\n\"是多余的，会导致评分出错，如果程序要求换行，应该写成printf(\"%d\\n\",a+b);\n" +
    "\n" +
    " \n" +
    "\n" +
    "#### 题目：读入一行字符，输出它的长度。\n" +
    "\n" +
    "【错误示例1】\n" +
    "\n" +
    "\n" +
    "```\n" +
    "#include<stdio.h>\n" +
    "\n" +
    "#include<string.h>\n" +
    "\n" +
    "int main()\n" +
    "\n" +
    "{\n" +
    "\n" +
    "    char  s[1024];\n" +
    "\n" +
    "    scanf(\"%s\",s);\n" +
    "\n" +
    "    printf(\"%d\",strlen(s));\n" +
    "\n" +
    "    return 0;\n" +
    "\n" +
    "}\n" +
    "```\n" +
    "\n" +
    "错误原因：%s是词输入，一行字符中可能有空格，空格后面的字符将不会读入。\n" +
    "\n" +
    " \n" +
    "\n" +
    "【错误示例2】\n" +
    "\n" +
    "\n" +
    "```\n" +
    "#include<stdio.h>\n" +
    "\n" +
    "int main()\n" +
    "\n" +
    "{\n" +
    "\n" +
    "    char  s[1024];\n" +
    "\n" +
    "    int i;\n" +
    "\n" +
    "    for(i=0; (s[i]=getchar())!='\\n';++i);\n" +

    "\n" +
    "    printf(\"%d\",i);\n" +
    "\n" +
    "    return 0;\n" +
    "\n" +
    "}\n" +
    "```\n" +
    "\n" +
    "错误原因：'\\n'是windows下面的换行符号，linux下面的换行符是'\\r'，所以这个程序提交到服务器后循环会超时。\n" +
    "\n" +
    "解决方案：用fgets或者gets读入一行字符串。"

